<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of extendedMatrix</title>
  <meta name="keywords" content="extendedMatrix">
  <meta name="description" content="Calculate the Extended Matrix of matrix A as single matrix.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">source</a> &gt; extendedMatrix.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for source&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>extendedMatrix
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Calculate the Extended Matrix of matrix A as single matrix.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [ Ae ] = extendedMatrix( A, n, m, hState, d ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment">Calculate the Extended Matrix of matrix A as single matrix.

Calculate the Extended Matrix of matrix A as single matrix where n is the
degree of A and m is the degree of the state vector x in homogeneous form.

Prototype: [Ae] = extendedMatrix(A, n, m, hState, d)

Input:     A - nxn matrix with Syms affine parameters.
           n - Degree of A.
           m - Degree of the state vector x in homogeneous form.
           hState - Homogeneous state vector.
           d - Dimension of homogeneous state vector hState.

Output:    newA - Extended Affine Matrix A as single matrix</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="getCoefficientFromString.html" class="code" title="function [ coefficient ] = getCoefficientFromString( chr )">getCoefficientFromString</a>	Take the coefficients of variables that don't have, for construction, any divisor.</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="extendedAffine.html" class="code" title="function [ newA ] = extendedAffine( A, n, m, hState, d )">extendedAffine</a>	Calculate the Extended Affine Matrix of matrix A.</li></ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">%Calculate the Extended Matrix of matrix A as single matrix.</span>
0002 <span class="comment">%</span>
0003 <span class="comment">%Calculate the Extended Matrix of matrix A as single matrix where n is the</span>
0004 <span class="comment">%degree of A and m is the degree of the state vector x in homogeneous form.</span>
0005 <span class="comment">%</span>
0006 <span class="comment">%Prototype: [Ae] = extendedMatrix(A, n, m, hState, d)</span>
0007 <span class="comment">%</span>
0008 <span class="comment">%Input:     A - nxn matrix with Syms affine parameters.</span>
0009 <span class="comment">%           n - Degree of A.</span>
0010 <span class="comment">%           m - Degree of the state vector x in homogeneous form.</span>
0011 <span class="comment">%           hState - Homogeneous state vector.</span>
0012 <span class="comment">%           d - Dimension of homogeneous state vector hState.</span>
0013 <span class="comment">%</span>
0014 <span class="comment">%Output:    newA - Extended Affine Matrix A as single matrix</span>
0015 
0016 <a name="_sub0" href="#_subfunctions" class="code">function [ Ae ] = extendedMatrix( A, n, m, hState, d )</a>
0017 
0018 syms x;
0019 <span class="keyword">for</span> i = 1:n
0020     x(i) = [<span class="string">'x_'</span> int2str(i)];
0021 <span class="keyword">end</span>
0022 
0023 <span class="keyword">for</span> i = 1:n
0024     xdiff(:,i) = diff(hState, x(i));
0025 <span class="keyword">end</span>
0026 
0027 clear x;
0028 syms x;
0029 
0030 <span class="keyword">for</span> i = 1:n
0031     x(i,1) = [<span class="string">'x_'</span> int2str(i)];
0032 <span class="keyword">end</span>
0033 
0034 result = expand(xdiff*A*x);
0035 
0036 syms Ae;
0037 <span class="keyword">for</span> i = 1:length(result)
0038     <span class="keyword">for</span> j = 1:length(hState)
0039         chr = char(expand(result(i)/hState(j)));
0040         Ae(i, j) = <a href="getCoefficientFromString.html" class="code" title="function [ coefficient ] = getCoefficientFromString( chr )">getCoefficientFromString</a>(chr);
0041     <span class="keyword">end</span>
0042 <span class="keyword">end</span>
0043 
0044 <span class="keyword">return</span>;
0045 
0046 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Mon 12-Oct-2009 21:15:56 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>